package com.zc.study.thread.多线程第三章节.thread3_3_2;

import javax.tools.Tool;

public class Test {
    public static void main(String[] args) {
        ThreadA a = new ThreadA();
        ThreadB b= new ThreadB();
        a.start();
        b.start();
        for (int i = 0;i<100;i++){
            Thread.currentThread().setName("main");
            Tools.t1.set(Thread.currentThread().getName()+(i+1));
            System.out.println(Tools.t1.get());
            try {
                Thread.sleep(2000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
}
